<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta content="StApi,接口管理，低代码" name="keywords"/>
    <meta content="神土" name="description"/>
    <meta contect="fuzl" name="author"/>
    <meta content="IE=edge" http-equiv="X-UA-Compatible">
    <meta content="width=device-width, initial-scale=1.0" name="viewport">
    <title>管理平台</title>
</head>

<!--页面专属css-->
<!--共用css-->
<link href="/public/element/index.css" rel="stylesheet"/>
<link href="/public/codemirror/lib/codemirror.css" rel="stylesheet"/>
<script src="/public/env.js"></script>
<script src="/public/vue.global.prod.js"></script>
<script src="/public/vue-router.global.prod.js"></script>
<script src="/public/vue3-sfc-loader.js"></script>
<script src="/public/element/index.full.js"></script>
<script src="/public/element/zh-cn.js"></script>
<script src="/public/element/index.iife.min.js"></script>
<script src="/public/axios.min.js"></script>
<script src="/public/axios.config.js"></script>
<script src="/public/loadVue.js"></script>
<script src="/public/icons.js"></script>
<script src="/public/codemirror/lib/codemirror.js"></script>
<script src="/public/codemirror/mode/javascript/javascript.js"></script>
<script src="/public/utils.js"></script>
<script src="/public/mitt.umd.js"></script>
<script src="/public/echarts.min.js"></script>
<script src="/public/moment.js"></script>
<!--共用css-->
<body>
<div id="app">
    <router-view></router-view>
</div>
</body>
<script>
    const {createApp, ref, reactive, onMounted, toRefs, computed, watch, nextTick} = Vue;
    const {createRouter, createWebHistory, useRoute, useRouter} = VueRouter;
    const routes = [
        {path: '/',redirect: '/login', hidden: true,children: []},
        {path: '/login',component: loadVue('./view/login.vue'),name: '登录'},
        {path: '/user-info',component: loadVue('./view/sys-user/info.vue'),name: '用户信息',hidden: true},
        {path: '/social-login',component:loadVue('./view/social/login.vue'),  hidden: true},
        {path: '/home',component: loadVue('./view/home.vue'), hidden: true,  children: [
                {path: '/gateway', component: loadVue('./view/gateway/index.vue'), name: '网关管理', icon: 'guide'},
                {path: '/terminal', component: loadVue('./view/terminal/index.vue'), name: '终端列表', icon: 'message-box'},
                {path: '/device', component: loadVue('./view/device/index.vue'), name: '设备列表', icon: 'message-box'},
                {path: '/scene', component: loadVue('./view/scene/index.vue'), name: '场景联动', icon: 'quartz-watch'},
                {path: '/alarm', component: loadVue('./view/alarm/index.vue'), name: '告警列表', icon: 'warn-triangle-filled'},
                {path: '/event-log', component: loadVue('./view/event-log/index.vue'), name: '事件列表', icon: 'info-filled'},
                {path: '/sys',component: loadVue('./view/layout.vue'),icon:"tools", name:'系统配置',  children: [
                    {path: '/sysconfig', component: loadVue('./view/sysconfig/index.vue'), name: '参数配置', icon: 'setting'},
                    {path: '/signal', component: loadVue('./view/signal/index.vue'), name: '遥测信号', icon: 'odometer'},
                    {path: '/profile', component: loadVue('./view/profile/index.vue'), name: '终端配置', icon: 'cellphone'},
                    {path: '/user', component: loadVue('./view/sys-user/index.vue'), name: '用户管理', icon: 'setting'},
                ]},
            ]},
    ]
    const router = createRouter({
            history: createWebHistory(),
            routes
        })
    const app = createApp({
        setup(props, context) {

        }
    })
        .use(router)
        .use(ElementPlus);

    app.component("breadcrumb", loadVue('./component/breadcrumb.vue'));
    for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
        app.component("Menu" == key ? "icon-menu" : key, component)
    }
    app.mount('#app');
</script>
<style>



</style>
</html>